import { Outlet, useNavigate } from 'react-router-dom'
import $styles from './index.module.less'
import { context } from '../../store'
import { useContext, useEffect } from 'react';

const Home = () => {
  const { state: {count} } = useContext(context)
  const navigate = useNavigate()
  useEffect(() => {
    navigate('test')
  }, [navigate])
  return (
    <div className={$styles.homeView}>
      <h2>home parent</h2>
      <h4>count: {count}</h4>
      <Outlet />
    </div>
  );
};

export default Home